package com.jqsoft.launcher.dictionarydb;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * 建立数据库类
 * @author gujunqi
 */
public class DictionaryDbOpenHelper extends SQLiteOpenHelper {

	public DictionaryDbOpenHelper(Context context) {
		super(context, "dictionary.db", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("create table dictionary (id varchar(50) primary key , dict_code varchar(50), isort integer, item_name varchar(50),item_code varchar(50), iused integer)");

//		id varchar(50) primary key,   //主键
//		dict_code varchar(50),	      //字典代码
//		isort integer,                //排序
//		item_name varchar(50),        //字典明细名称
//		item_code varchar(50),        //字典明细代码
//		iused integer                 //是否启用
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
